#include "include/knowledgebase.h"

KnowledgeBase::KnowledgeBase()
{
	m_Deck = new Deck();
}


KnowledgeBase::~KnowledgeBase()
{
	delete m_Deck;
	m_Deck = 0; //for the case if anybody tries to use a dead KnowledgeBase object
}


Deck* KnowledgeBase::deck() const
{
	return m_Deck;
}


TreeItem* KnowledgeBase::getTreeItem(QUuid id) const
{
	return parentPointerFinder[id];
}


void KnowledgeBase::setTreeItem(QUuid id, TreeItem* item)
{
	parentPointerFinder[id] = item;
}


void KnowledgeBase::clear()
{
	m_Deck->clear();
	parentPointerFinder.clear();
}

